Rename File
AutomatR.Dropbox.Activities.RenameFile
The "Rename File" activity in AutomatR is part of the Dropbox activities package, designed to rename a file within the user's Dropbox account. This activity streamlines the process of renaming files in Dropbox, enhancing the efficiency of automation workflows.
Properties
Name | Description |
---|---|
Input | |
File Path | Specifies the full path of the file to be renamed in Dropbox, including the file name. String variables containing the file path. Example: "Root/DeleteFile/File1.txt" |
New Name | Specifies the new file name for the file. String variables containing the new file name. |
Misc | |
Display Name | Provides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variables containing the desired display name. |
Optional | |
Delay | Specifies the amount of time (in seconds) to wait before executing the "Rename File" activity. Integer variables containing the delay duration. Example: 5 seconds i.e. 5. |
Output | |
Result | Outputs a boolean value indicating whether the file rename operation was successful (True) or encountered errors (False). Variables of relevant types (e.g., Boolean variables) to store the operation result. |
How to Use
- Drag and drop the "Rename File" activity onto the workflow.
- Configure the properties by specifying the file path to be renamed, the new file name, and optionally set the delay and customize the display name.
- Execute the workflow to rename the specified file within Dropbox.
Important Notes:
- Ensure that the activity is placed within a "Dropbox Scope" activity to establish the necessary authentication scope.
- The "File Path" should include the full path, including the file name, of the file to be renamed in Dropbox.
- If the "New Name" includes a file extension, it must match the original file's extension; otherwise, an error will be thrown.
- Verify that the provided file path exists and refers to a file; otherwise, an exception will be raised.
Example:
Consider an example where the "Rename File" activity is used to rename a file named "File1.txt" to "NewFile.txt" within Dropbox:
Rename File:
Display Name: "Rename Document"
File Path: "Root/DeleteFile/File1.txt"
New Name: "NewFile.txt"
Result: isRenameSuccessful
In this example, the activity renames the file "File1.txt" to "NewFile.txt" within the specified path in Dropbox. The result of the operation (success or failure) is stored in the Boolean variable "isRenameSuccessful" for further handling in the workflow.